#include "Connector.h"


std::vector<Connector*> Connector::ConnectorList;

Connector::Connector(TestEntity* t1, TestEntity* t2){

    ent1 = t1;
    ent2 = t2;
    ConnectorList.push_back(this);

}

void Connector::Update(){

    line[0] = sf::Vertex((sf::Vector2f)ent1->getPixelPosition(), sf::Color::Black);
    line[1] = sf::Vertex((sf::Vector2f)ent2->getPixelPosition(), sf::Color::Black);

}

void Connector::Render(sf::RenderWindow& window){

    window.draw(line,2,sf::Lines);

}
